/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * DConsultaMateriales.java
 *
 * Created on 02-jul-2012, 10:11:07
 */
package Test;

import java.util.ArrayList;
import java.util.List;
import javax.swing.UIManager;
import net.coderazzi.filters.gui.TableFilterHeader;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;

/**
 *
 * @author myguel
 */
public class DConsultaMateriales extends javax.swing.JDialog {

    private ModeloTablaConsultaMaterial modeloTabla;
    private TableFilterHeader filterHeader;

    /** Creates new form DConsultaMateriales */
    public DConsultaMateriales(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setLocationRelativeTo(null);
        List<BeanMaterial> materiales = new ArrayList<BeanMaterial>();
        BeanMaterial m1 = new BeanMaterial("1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1");
        BeanMaterial m2 = new BeanMaterial("2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2");
        BeanMaterial m3 = new BeanMaterial("3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3");
        BeanMaterial m4 = new BeanMaterial("4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4");
        BeanMaterial m5 = new BeanMaterial("5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5");
        BeanMaterial m6 = new BeanMaterial("6", "6", "6", "6", "6", "6", "6", "6", "6", "6", "6", "6", "6");
        materiales.add(m1);
        materiales.add(m2);
        materiales.add(m3);
        materiales.add(m4);
        materiales.add(m5);
        materiales.add(m6);
        this.modeloTabla = new ModeloTablaConsultaMaterial(materiales);
//        jTable1.setModel(modeloTabla);
        TableSorter tableSorter = new TableSorter(modeloTabla, tblMateriales.getTableHeader());
        tblMateriales.setModel(tableSorter);
        filterHeader = new TableFilterHeader();
        filterHeader.setTable(tblMateriales);
        AutoCompleteDecorator.decorate(cmbDivision);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel5 = new javax.swing.JPanel();
        pnlTipo = new javax.swing.JPanel();
        lblTipoConsulta = new javax.swing.JLabel();
        cmbTipoConsulta = new javax.swing.JComboBox();
        lblCliente = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        pnlLeft = new javax.swing.JPanel();
        lblDescripcionCorta = new javax.swing.JLabel();
        lblMaterial = new javax.swing.JLabel();
        pnlLeft1 = new javax.swing.JPanel();
        txtDescripcionCorta = new javax.swing.JTextField();
        pnlBottom = new javax.swing.JPanel();
        txtMaterial = new javax.swing.JTextField();
        lblMarca = new javax.swing.JLabel();
        txtMarca = new javax.swing.JTextField();
        jPanel4 = new javax.swing.JPanel();
        pnlLeft2 = new javax.swing.JPanel();
        lblDescripcion = new javax.swing.JLabel();
        lblTipo = new javax.swing.JLabel();
        pnlLeft3 = new javax.swing.JPanel();
        txtDescripcionLarga = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        cmbTipo = new javax.swing.JComboBox();
        lblCondPago = new javax.swing.JLabel();
        cmbCondPago = new javax.swing.JComboBox();
        pnlBotones = new javax.swing.JPanel();
        btnBuscar = new javax.swing.JButton();
        btnPasarPedido = new javax.swing.JButton();
        pnlMateriales = new javax.swing.JPanel();
        scrollMateriales = new javax.swing.JScrollPane();
        tblMateriales = new javax.swing.JTable();
        lblConfirmacion = new javax.swing.JLabel();
        btnCerrar = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        lblDivision = new javax.swing.JLabel();
        cmbDivision = new javax.swing.JComboBox();
        jPanel8 = new javax.swing.JPanel();
        lblCategoria = new javax.swing.JLabel();
        cmbCategoria = new javax.swing.JComboBox();
        jPanel9 = new javax.swing.JPanel();
        lblFamilia = new javax.swing.JLabel();
        cmbFamilia = new javax.swing.JComboBox();
        jPanel10 = new javax.swing.JPanel();
        lblLinea = new javax.swing.JLabel();
        cmbLinea = new javax.swing.JComboBox();
        jPanel11 = new javax.swing.JPanel();
        lblGrupo = new javax.swing.JLabel();
        cmbGrupo = new javax.swing.JComboBox();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Consulta de Materiales");

        pnlTipo.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        lblTipoConsulta.setText("Tipo de Consulta:");
        pnlTipo.add(lblTipoConsulta);

        cmbTipoConsulta.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Por Material", "Top x Cliente", "Top x Tipologia", "PromeOferta", "Dscto Politica", "Mat Dscto Manual" }));
        cmbTipoConsulta.setPreferredSize(new java.awt.Dimension(150, 20));
        cmbTipoConsulta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbTipoConsultaActionPerformed(evt);
            }
        });
        pnlTipo.add(cmbTipoConsulta);

        lblCliente.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCliente.setText("<Cliente>");
        pnlTipo.add(lblCliente);

        jPanel2.setLayout(new java.awt.GridLayout(1, 0, 4, 4));

        jPanel3.setLayout(new java.awt.BorderLayout(4, 0));

        pnlLeft.setLayout(new java.awt.GridLayout(2, 1, 4, 4));

        lblDescripcionCorta.setText("Descripción Corta:");
        pnlLeft.add(lblDescripcionCorta);

        lblMaterial.setText("Material:");
        pnlLeft.add(lblMaterial);

        jPanel3.add(pnlLeft, java.awt.BorderLayout.LINE_START);

        pnlLeft1.setLayout(new java.awt.GridLayout(2, 1, 4, 8));
        pnlLeft1.add(txtDescripcionCorta);

        pnlBottom.setLayout(new java.awt.GridLayout(1, 3, 4, 4));
        pnlBottom.add(txtMaterial);

        lblMarca.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblMarca.setText("Marca:");
        pnlBottom.add(lblMarca);
        pnlBottom.add(txtMarca);

        pnlLeft1.add(pnlBottom);

        jPanel3.add(pnlLeft1, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel3);

        jPanel4.setLayout(new java.awt.BorderLayout(4, 0));

        pnlLeft2.setLayout(new java.awt.GridLayout(2, 1, 4, 4));

        lblDescripcion.setText("Descripción Larga:");
        pnlLeft2.add(lblDescripcion);

        lblTipo.setText("Tipo:");
        pnlLeft2.add(lblTipo);

        jPanel4.add(pnlLeft2, java.awt.BorderLayout.LINE_START);

        pnlLeft3.setLayout(new java.awt.GridLayout(2, 1, 4, 8));
        pnlLeft3.add(txtDescripcionLarga);

        cmbTipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        lblCondPago.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblCondPago.setText("<html>Cond. Pago:<font color='red'> *</font></html>");

        cmbCondPago.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3fdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "Item 4" }));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(cmbTipo, 0, 83, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblCondPago, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cmbCondPago, 0, 84, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(cmbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblCondPago, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)
                    .addComponent(cmbCondPago, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE))
                .addContainerGap())
        );

        pnlLeft3.add(jPanel1);

        jPanel4.add(pnlLeft3, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel4);

        pnlBotones.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 0));

        btnBuscar.setText("Buscar");
        btnBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarActionPerformed(evt);
            }
        });
        pnlBotones.add(btnBuscar);

        btnPasarPedido.setText("Pasar Pedido");
        btnPasarPedido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPasarPedidoActionPerformed(evt);
            }
        });
        pnlBotones.add(btnPasarPedido);

        pnlMateriales.setLayout(new java.awt.BorderLayout());

        tblMateriales.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblMateriales.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        scrollMateriales.setViewportView(tblMateriales);

        pnlMateriales.add(scrollMateriales, java.awt.BorderLayout.CENTER);

        lblConfirmacion.setForeground(new java.awt.Color(0, 153, 0));
        lblConfirmacion.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        pnlMateriales.add(lblConfirmacion, java.awt.BorderLayout.PAGE_START);

        btnCerrar.setText("Cerrar");
        btnCerrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarActionPerformed(evt);
            }
        });

        jPanel7.setLayout(new java.awt.GridLayout(2, 1));

        lblDivision.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblDivision.setText("División");
        lblDivision.setMaximumSize(new java.awt.Dimension(25, 10));
        lblDivision.setMinimumSize(new java.awt.Dimension(25, 10));
        lblDivision.setPreferredSize(new java.awt.Dimension(25, 10));
        jPanel7.add(lblDivision);

        cmbDivision.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbDivision.setMaximumSize(new java.awt.Dimension(56, 20));
        cmbDivision.setMinimumSize(new java.awt.Dimension(56, 20));
        cmbDivision.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbDivisionActionPerformed(evt);
            }
        });
        jPanel7.add(cmbDivision);

        jPanel8.setLayout(new java.awt.GridLayout(2, 1));

        lblCategoria.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblCategoria.setText("Categoría");
        lblCategoria.setMaximumSize(new java.awt.Dimension(25, 10));
        lblCategoria.setMinimumSize(new java.awt.Dimension(25, 10));
        lblCategoria.setPreferredSize(new java.awt.Dimension(25, 10));
        jPanel8.add(lblCategoria);

        cmbCategoria.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbCategoria.setMaximumSize(new java.awt.Dimension(56, 20));
        cmbCategoria.setMinimumSize(new java.awt.Dimension(56, 20));
        cmbCategoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbCategoriaActionPerformed(evt);
            }
        });
        jPanel8.add(cmbCategoria);

        jPanel9.setLayout(new java.awt.GridLayout(2, 1));

        lblFamilia.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFamilia.setText("Familia");
        lblFamilia.setMaximumSize(new java.awt.Dimension(25, 10));
        lblFamilia.setMinimumSize(new java.awt.Dimension(25, 10));
        lblFamilia.setPreferredSize(new java.awt.Dimension(25, 10));
        jPanel9.add(lblFamilia);

        cmbFamilia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbFamilia.setMaximumSize(new java.awt.Dimension(56, 20));
        cmbFamilia.setMinimumSize(new java.awt.Dimension(56, 20));
        cmbFamilia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbFamiliaActionPerformed(evt);
            }
        });
        jPanel9.add(cmbFamilia);

        jPanel10.setLayout(new java.awt.GridLayout(2, 1));

        lblLinea.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblLinea.setText("Línea");
        lblLinea.setMaximumSize(new java.awt.Dimension(25, 10));
        lblLinea.setMinimumSize(new java.awt.Dimension(25, 10));
        lblLinea.setPreferredSize(new java.awt.Dimension(25, 10));
        jPanel10.add(lblLinea);

        cmbLinea.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbLinea.setMaximumSize(new java.awt.Dimension(56, 20));
        cmbLinea.setMinimumSize(new java.awt.Dimension(56, 20));
        cmbLinea.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbLineaActionPerformed(evt);
            }
        });
        jPanel10.add(cmbLinea);

        jPanel11.setLayout(new java.awt.GridLayout(2, 1));

        lblGrupo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblGrupo.setText("Grupo");
        lblGrupo.setMaximumSize(new java.awt.Dimension(25, 10));
        lblGrupo.setMinimumSize(new java.awt.Dimension(25, 10));
        lblGrupo.setPreferredSize(new java.awt.Dimension(25, 10));
        jPanel11.add(lblGrupo);

        cmbGrupo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbGrupo.setMaximumSize(new java.awt.Dimension(56, 20));
        cmbGrupo.setMinimumSize(new java.awt.Dimension(56, 20));
        jPanel11.add(cmbGrupo);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                .addGap(4, 4, 4)
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE)
                .addGap(4, 4, 4)
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                .addGap(4, 4, 4)
                .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                .addGap(4, 4, 4)
                .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 705, Short.MAX_VALUE)
                    .addComponent(pnlBotones, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 705, Short.MAX_VALUE)
                    .addComponent(pnlMateriales, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 705, Short.MAX_VALUE)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(pnlTipo, javax.swing.GroupLayout.DEFAULT_SIZE, 620, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnCerrar, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btnCerrar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlTipo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlBotones, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlMateriales, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)
                .addContainerGap())
        );

        getContentPane().add(jPanel5, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void cmbDivisionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbDivisionActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cmbDivisionActionPerformed

private void cmbCategoriaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbCategoriaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cmbCategoriaActionPerformed

private void cmbFamiliaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbFamiliaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cmbFamiliaActionPerformed

private void cmbLineaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbLineaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cmbLineaActionPerformed

private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_btnBuscarActionPerformed

private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_btnCerrarActionPerformed

private void btnPasarPedidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPasarPedidoActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_btnPasarPedidoActionPerformed

private void cmbTipoConsultaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbTipoConsultaActionPerformed
// TODO add your handling code here:
    int opcion = cmbTipoConsulta.getSelectedIndex();
    switch (opcion) {
        case 0:
            //Por material
            break;
        case 1:
            //Por cliente
            break;
        case 2:
            //Por tipologia
            break;
    }
}//GEN-LAST:event_cmbTipoConsultaActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            UIManager.setLookAndFeel(
                    UIManager.getSystemLookAndFeelClassName());
        } catch (Exception ex) {
            java.util.logging.Logger.getLogger(DConsultaMateriales.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                DConsultaMateriales dialog = new DConsultaMateriales(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnCerrar;
    private javax.swing.JButton btnPasarPedido;
    private javax.swing.JComboBox cmbCategoria;
    private javax.swing.JComboBox cmbCondPago;
    private javax.swing.JComboBox cmbDivision;
    private javax.swing.JComboBox cmbFamilia;
    private javax.swing.JComboBox cmbGrupo;
    private javax.swing.JComboBox cmbLinea;
    private javax.swing.JComboBox cmbTipo;
    private javax.swing.JComboBox cmbTipoConsulta;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JLabel lblCategoria;
    private javax.swing.JLabel lblCliente;
    private javax.swing.JLabel lblCondPago;
    private javax.swing.JLabel lblConfirmacion;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JLabel lblDescripcionCorta;
    private javax.swing.JLabel lblDivision;
    private javax.swing.JLabel lblFamilia;
    private javax.swing.JLabel lblGrupo;
    private javax.swing.JLabel lblLinea;
    private javax.swing.JLabel lblMarca;
    private javax.swing.JLabel lblMaterial;
    private javax.swing.JLabel lblTipo;
    private javax.swing.JLabel lblTipoConsulta;
    private javax.swing.JPanel pnlBotones;
    private javax.swing.JPanel pnlBottom;
    private javax.swing.JPanel pnlLeft;
    private javax.swing.JPanel pnlLeft1;
    private javax.swing.JPanel pnlLeft2;
    private javax.swing.JPanel pnlLeft3;
    private javax.swing.JPanel pnlMateriales;
    private javax.swing.JPanel pnlTipo;
    private javax.swing.JScrollPane scrollMateriales;
    private javax.swing.JTable tblMateriales;
    private javax.swing.JTextField txtDescripcionCorta;
    private javax.swing.JTextField txtDescripcionLarga;
    private javax.swing.JTextField txtMarca;
    private javax.swing.JTextField txtMaterial;
    // End of variables declaration//GEN-END:variables
}
